$(function() {
  var href = window.location.href;
  var urlObj = new URL(href);
  var  [a] = urlObj.searchParams.values();
  
    $.ajax({
        type: 'GET',
        url: serverPort + '/ddApi/socialOb/getWeatherRealDetail?id='+[a][0],
        dataType: 'json',
        success: function(res) {
          console.log(res)
            var detailData = res.data
            var supperList = detailData.supportUserList

            var detailDom = `
            <!-- 头部图片 -->
            <div class="wd-img">
              <img src="${detailData.weatherPic}" alt="">
            </div>
        
            <!-- 内容部分 -->
            <div class="wd-content">
                <div class="tt">
                  <span>${switchs(detailData.status +'').j}</span>
                  <p>162</p>
                </div>
                <p class='psy'>拍摄于时间: ${detailData.picTime}</p>
        
                <!-- 详细内容 -->
                <div class="detail">
                  <p>拍摄地点：${detailData.location}</p>
                  <p>上传时间：${detailData.picTime}</p>
                </div>
        
                <div class="user-love">
                  <div class='love'>${detailData.supportNum}</div>
                  <ul class="users">
                  </ul>
                </div>
              </div>
            </div>
            `
            $('.w_detail_box').append(detailDom)

            for (var i = 0; i < supperList.length;i++) {
                var lidom = `
                    <li>
                        <img src="${supperList[i].headUrl}" alt="">
                    </li>
                `
                $('.user-love .users').append(lidom)
            }

        }
    })
})